package com.cindata

class VehicleCSVImporter extends CSVImpoter
{

    /*******************按照实体将csv对应的列进行排序列出*******************************/
    static columnsSet = [
        [ name: 'externalId'],
        [ name: 'name'],
        [ name: 'city'],
        [ name: 'district'],
        [ name: 'estateStatus'],
        [ name: 'type'],
        [ name: 'mileage'],
        [ name: 'plateNumber'],
        [ name: 'isNew'],
        [ name: 'brand'],
        [ name: 'model'],
        [ name: 'engineNumber'],
        [ name: 'releaseDate',type: 'Date'],
        [ name: 'purchaseDate',type: 'Date'],
        [ name: 'purchasePrice'],
        [ name: 'currency'],
        [ name: 'usage'],
        [ name: 'mortgageRegisterNo'],
        [ name: 'manufacturer'],
        [ name: 'cashability'],
        [ name: 'valueVolatility'],
        [ name: 'legalValidity'],
        [ name: 'valuationDate',type: 'Date'],
        [ name: 'totalPrice'],
        [ name: 'firstEvaluatePrice'],
        [ name: 'latestEvaluatePrice'],
        [ name: 'account'],
        [ name: 'evaluateStatue'],
        [ name: 'failReason'],
        [ name: 'fullName'],
        [ name: 'identityType'],
        [ name: 'idNumber'],
        [ name: 'loanCardNumber'],
        [ name: 'description'],
        [ name: 'registerFullName'],
        [ name: 'registerAccount'],
        [ name: 'registerDate',type: 'Date'],
        [ name: 'registerUpdateDate',type: 'Date']

    ]
    /*******************读取单个单元格数据**********************/

    VehicleCSVImporter(){
        columns = columnsSet
        startRow = 3
    }

    @Override
    def read(InputStream inputStream,String charsetName) {
        return super.read(inputStream,charsetName)
    }
}
